﻿namespace YuFeng.Web.Extentions
{
    /// <summary>
    /// 为字符串类型，编入json值中格式化
    /// </summary>
    internal static class StringGetJsonValue
    {
        /// <summary>
        /// 编入json值中格式化
        /// </summary>
        /// <param name="target"></param>
        /// <returns></returns>
        internal static string JsonValue(this System.String target)
        {
            if (string.IsNullOrEmpty(target)) return string.Empty;
            return target.Replace("\"", "\\\"");
        }
    }
}
